package app

import (
	"fmt"
	"html/template"
	"log"
	"net/http"
)

func (G *Global) Index(w http.ResponseWriter, r *http.Request) {
	t, template_err := template.ParseFiles("templates/index/index.html", "templates/common/head.html", "templates/common/foot.html")
	if template_err != nil {
		log.Println(template_err.Error())
		fmt.Fprintf(w, template_err.Error())
	} else {
		t.Execute(w, G)
	}
}
